package com.flyxiaozhu.erp.core.services;

import com.flyxiaozhu.erp.core.entities.GoodsTag;
import com.flyxiaozhu.erp.core.repositories.GoodsTagRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author flyxiaozhu
 * @date 2019-04-13 16:03
 */
@Service
public class GoodsTagService {
    @Autowired
    GoodsTagRepository goodsTagRepository;

    public GoodsTag findById(Long id) {
        return goodsTagRepository.findById(id).orElse(null);
    }

    public void delete(List<GoodsTag> goodsTagList) {
        goodsTagRepository.deleteAll(goodsTagList);
    }
}
